package org.weasel.views;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.weasel.controllers.BurndownChartController;

public class BurndownChartComposite extends Composite {
	@SuppressWarnings("unused")
	private BurndownChartController controller;
	private Group groupChart;
	private Label label = null;

	
	public BurndownChartComposite(Composite parent, int style, BurndownChartController controller) {
		super(parent, style);
		this.controller = controller;
		initialize();
	}

	private void initialize() {
		setSize(new Point(574, 368));
		setLayout(new FillLayout());
		groupChart = new Group(this, SWT.None);
		groupChart.setText("Burndown");
		groupChart.setLayout(new FillLayout());
		label = new Label(groupChart, SWT.NONE);
		label.setText("Label");
	}
	
	private void reloadChartFromFile(){
		Device device = groupChart.getDisplay();
		Image i = new Image(device, "burndownChart.jpg");
		label.setImage(i);
	}
	
	public void reload(){
		reloadChartFromFile();
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
